*** REPLICATION TOOLKIT ***

* AUTHORS: CIMINELLI DUVAL FURCERI 

* ARTICLE: EMPLOYMENT PROTECTION DEREGULATION AND LABOR SHARES IN ADVANCED ECONOMIES 

* JOURNAL: REVIEW OF ECONOMICS AND STATISTICS

* OUTPUT: TABLE C1 (ONLINE APPENDIX)

***************************

cd ""

use "DTA files/Dataset", clear

* Set excel file where to store table
putexcel set "Tables/C1", modify 

collapse v1=EOS_serv4_OLS v2=EOS_stock4_OLS v3=EOS_serv4_noIRR v4=EOS_serv4_wTRENDS, by(industry)

egen id = group(industry)
sum id
local max = r(max)

matrix descriptive = J(`max',4,.)
mat rownames descriptive = 10t12 13t15 16t18 19 20t21 22t23 24t25 26t27 28 29t30 31t33 45 46 47 49t52 53 58t60 61 62t63 A B DtE F I K L MtN O P Q R S 

forvalues j = 1/4 {
forvalues i = 1/`max' {
sum v`j' if id==`i'
local mean`j' = r(mean)
sum id if id == `i'
local id = r(mean)
matrix descriptive[`i',`j'] = `mean`j''
}
}
putexcel B2=matrix(descriptive) 
